<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
  <caption>个人信息</caption>
  <tr>
    <td>照片：</td><td id="head_td"></td>
  </tr>
  <tr>
    <td>姓名：</td><td id="name_td"></td>
  </tr>
  <tr>
    <td>年龄：</td><td id="age_td"></td>
  </tr>
  <tr>
    <td>好友：</td><td id="friend_td"></td>
  </tr>
</table>
<input type="button" value="加载数据" onclick="f()">
</body>
<script>
  let headTd = document.querySelector("#head_td");
  let nameTd = document.querySelector("#name_td");
  let ageTd = document.querySelector("#age_td");
  let friends = document.querySelector("#friend_td");

  function f() {
    let p1 = {picture: "man.jpg", name: "传奇哥", age: 25, friends: ["貂蝉", "马云禄", "武则天"]};
    let img = document.createElement("img")
    img.src = p1.picture;
    headTd.append(img);

    nameTd.innerText = p1.name;
    ageTd.innerText = p1.age;

    let ul = document.createElement("ul");
    for (let f of p1.friends) {
      let li = document.createElement("li");
      li.innerText = f;
      ul.append(li);
    }
    friends.append(ul);
  }
</script>
</html>